#include "process.h"
#include <unistd.h>
//目标文件的大小，单位M
double target_file_size = 1024.0;
double speed = 1.0;

void Download(double size, double split)
{
    double current_total = 0.0;
    while(current_total <= size)
    {
        //根据具体进度来刷新
        Fflushprocess(size, current_total);  
        //下载速度用sleep来模拟
        if(current_total >= size) 
            break;
        usleep(10000);
        current_total += split;
    }
    printf("\n");
}

int main()
{
    Download(target_file_size, speed);
    
    return 0;
}
